package com.ysd.lis.entity.bac;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ysd.lis.entity.BaseEntity;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.TableField;
import com.ysd.lis.entity.BaseEntityJpa;
import com.ysd.lis.util.compare.Compare;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * <p>
 * 血培养结果记录
 * </p>
 *
 * @author cfz
 * @since 2024-08-21
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("BAC_BLOOD_CULTRUE")
@Entity
@Table(name = "BAC_BLOOD_CULTRUE")
public class BacBloodCultrue extends BaseEntityJpa {

    private static final long serialVersionUID = 1L;


    /**
     * 报告单元
     */
    @TableField("RPT_GROUP")
    @Column(name = "RPT_GROUP")
    private String rptGroup;

    /**
     * 检验日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @TableField("SAMPLEDA")
    @Column(name = "SAMPLEDA")
    private Timestamp sampleda;

    /**
     * 标本号
     */
    @TableField("SAMPLE_NO")
    @Column(name = "SAMPLE_NO")
    private String sampleNo;

    /**
     * 工作流程
     */
    @TableField("TEST_FLOW_NO")
    @Column(name = "TEST_FLOW_NO")
    private String testFlowNo;

    /**
     * 工作流程节点
     */
    @TableField("TEST_NODE_NO")
    @Column(name = "TEST_NODE_NO")
    private String testNodeNo;

    /**
     * 申请号
     */
    @TableField("REQ_NO")
    @Column(name = "REQ_NO")
    private String reqNo;

    /**
     * 容器条码
     */
    @TableField("BARCODE")
    @Column(name = "BARCODE")
    private String barcode;

    /**
     * 培养瓶编号
     */
    @TableField("CUL_MEDIUM_NO")
    @Column(name = "CUL_MEDIUM_NO")
    private String culMediumNo;

    /**
     * 培养瓶名称
     */
    @TableField("CUL_MEDIUM_NA")
    @Column(name = "CUL_MEDIUM_NA")
    private String culMediumNa;

    /**
     * 培养重量
     */
    @TableField("WEIGHT")
    @Column(name = "WEIGHT")
    private String weight;

    /**
     * 报阳时长
     */
    @TableField("EXPO_TIME")
    @Column(name = "EXPO_TIME")
    private String expoTime;

    /**
     * 培养结果
     */
    @TableField("RESULT")
    @Column(name = "RESULT")
    private String result;

    /**
     * 培养结果
     */
    @TableField("RESULT_THREE_DAYS")
    @Column(name = "RESULT_THREE_DAYS")
    private String resultThreeDays;

    /**
     * 是否污染
     */
    @TableField("IS_POLLUTE")
    @Column(name = "IS_POLLUTE")
    private Double isPollute;

    /**
     * 形态描述
     */
    @TableField("OBSER_DESC")
    @Column(name = "OBSER_DESC")
    private String obserDesc;

    /**
     * 菌落计数
     */
    @TableField("STRAIN_COUNT")
    @Column(name = "STRAIN_COUNT")
    private String strainCount;

    /**
     * 特殊描述
     */
    @TableField("SPECIAL_DESC")
    @Column(name = "SPECIAL_DESC")
    private String specialDesc;

    /**
     * 仪器编号
     */
    @TableField("INSTR_CODE")
    @Column(name = "INSTR_CODE")
    private String instrCode;

    /**
     * 状态
     */
    @TableField("STATE")
    @Column(name = "STATE")
    private String state;

    /**
     * 是否危急值
     */
    @TableField("IS_ALARM")
    @Column(name = "IS_ALARM")
    private Double isAlarm;
    /**
     * 是否阳性，1阳性，0阴性
     */
    @TableField("IS_POSITIVE")
    @Column(name = "IS_POSITIVE")
    private Integer isPositive;

    /**
     * 培养架架号
     */
    @TableField("CULBOTTLE_NO")
    @Column(name = "CULBOTTLE_NO")
    private String culbottleNo;

    /**
     * 培养瓶号
     */
    @TableField("BOTTLE_NO")
    @Column(name = "BOTTLE_NO")
    private String bottleNo;

    /**
     * 所在架子列号
     */
    @TableField("POS_COL")
    @Column(name = "POS_COL")
    private String posCol;

    /**
     * 所在架子行号
     */
    @TableField("POS_ROW")
    @Column(name = "POS_ROW")
    private String posRow;

    /**
     * 所在位置信息
     */
    @TableField("POS_INFO")
    @Column(name = "POS_INFO")
    private String posInfo;

    /**
     * 上机时间
     */
    @TableField("TEST_TIME")
    @Column(name = "TEST_TIME")
    private Timestamp testTime;

    /**
     * 结果时间
     */
    @TableField("RESULT_TIME")
    @Column(name = "RESULT_TIME")
    private Timestamp resultTime;

    /**
     * 培养时间
     */
    @TableField("CULTURE_TIME")
    @Column(name = "CULTURE_TIME")
    private String cultureTime;

    /**
     * 培养曲线路径
     */
    @TableField("CULTURE_CURVE_URLS")
    @Column(name = "CULTURE_CURVE_URLS")
    private String cultureCurveUrls;

    /**
     * 销毁时间
     */
    @TableField("DESTRUCTION_TIME")
    @Column(name = "DESTRUCTION_TIME")
    private String destructionTime;

    /**
     * 采样部位
     */
    @TableField("SAMPLING_SITE")
    @Column(name = "SAMPLING_SITE")
    private String samplingSite;

    /**
     * 危急值描述
     */
    @TableField("ALARM_TEXT")
    @Column(name = "ALARM_TEXT")
    private String alarmText;

    /**
     * 发布级别    如：0未发布、1已发布
     */
    @Compare("发布级别")
    @TableField("BAC_PUBLISH_STATUS")
    @Column(name = "BAC_PUBLISH_STATUS")
    private BigDecimal bacPublishStatus;

    /**
     * 是否自动审核
     */
    @TableField("IS_AUTO_AUDIT")
    @Column(name = "IS_AUTO_AUDIT")
    private String isAutoAudit;

    /**
     * 自动审核返回结果
     */
    @TableField("AUTO_AUDIT_MESSAGE")
    @Column(name = "AUTO_AUDIT_MESSAGE")
    private String autoAuditMessage;


    /**
     * 采样部位名称
     */
    @TableField(exist = false)
    @Transient
    private String samplingSiteNa;

    /**
     * 培养箱名称
     */
    @TableField(exist = false)
    @Transient
    private String instrNa;

    @TableField(exist = false)
    @Transient
    private String mediumTag;
    @TableField(exist = false)
    @Transient
    private String mediumType;
    @TableField(exist = false)
    @Transient
    private String cultureBottle;
}
